package cn.iot.sys.entity;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 水电设备信息类
 */
@Data
@TableName("t_sys_ewdevice")
public class SysEwDevice implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId
    private int id;
    @TableField("gateway_id")
    private String gatewayId;//网关ID
    @TableField("device_code")
    private String deviceCode;//设备编号
    @TableField("device_type")
    private String deviceType;//设备类型1-电表 2-水表 3-人脸闸机
    @TableField("device_name")
    private String deviceName;//设备名称
    @TableField("device_status")
    private String deviceStatus;//设备状态0-有效 1-无效
    @TableField("device_location")
    private String deviceLocation;//设备位置
    @TableField("recharge_count")
    private int rechargeCount;//充值次数
    @TableField("device_balance")
    private BigDecimal deviceBalance;//设备剩余金额
    @TableField("device_surplus")
    private BigDecimal deviceSurplus;//设备剩余量
    @TableField("totle")
    private BigDecimal totle;//总量
    @TableField("devi_ip")
    private String deviIp;//设备ip
    @TableField("devi_username")
    private String deviUsername;//设备用户名
    @TableField("devi_password")
    private String deviPassword;//设备密码
    @TableField("devi_sdk_port")
    private String devi_sdk_port;//设备sdk端口号
    @TableField("devi_access_type")
    private String devi_access_type;//设备出入类型1-进入闸机 2-出闸机
    @TableField("devi_open_always_time_index")
    private String devi_open_always_time_index;//常开时段
    @TableField("devi_close_always_time_index")
    private String devi_close_always_time_index;//常闭时段
    @TableField("bslo_id")
    private String bslo_id;//空间位置
    @TableField("devi_other_info")
    private String devi_other_info;//设备其他信息
    @TableField("surplus_unit")
    private String surplus_unit;//剩余量单位
    @TableField("sluice_status")
    private String sluiceStatus;//水表阀门状态0-开阀门 1-关阀门
    @TableField("electricity_status")
    private String electricityStatus;//电表总状态0-拉闸 1-合闸
    @TableField("electricity_a_status")
    private String electricityAStatus;//电表A路状态0-拉闸 1-合闸
    @TableField("electricity_b_status")
    private String electricityBStatus;//电表B路状态0-拉闸 1-合闸
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;//创建时间
    @TableField("modify_time")
    private Date modifyTime;//修改时间
    @TableField("online_status")
    private String onlineStatus;//状态 0-离线 1-在线
    @TableField("attence_location")
    private String attenceLocation;//位置 1-宿舍 2-教学楼
    @TableField("is_subsceibe")
    private String isSubsceibe;//是否订阅
    @TableField("sync_time")
    private String syncTime;//同步时间
}
